

<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="panel panel-default panel-intro">
        <div class="panel-heading">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#base" data-toggle="tab">基础</a></li>
                <li><a href="#img" data-toggle="tab">图片</a></li>
            </ul>
        </div>

        <div class="panel-body">
            <div id="myTabContent" class="tab-content">

                <div class="tab-pane fade active in" id="base">
                    <div class="form-group">
                        <label for="c-cat_id" class="control-label col-xs-12 col-sm-2">{:__('Cat_id')}:</label>
                        <div class="col-xs-12 col-sm-8">

                            <select  id="c-cat_id" data-rule="required" class="form-control selectpicker" name="row[cat_id]">
                                {foreach name="catList" item="vo"}
                                <option value="{$key}" {eq name="row.cat_id" value="$key"}selected{/eq}>{$vo}</option>
                                {/foreach}
                            </select>

                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-pro_name" class="control-label col-xs-12 col-sm-2">{:__('Pro_name')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-pro_name" data-rule="required" class="form-control" name="row[pro_name]" type="text" value="{$row.pro_name}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-pro_price" class="control-label col-xs-12 col-sm-2">{:__('Pro_price')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-pro_price" data-rule="required" class="form-control" name="row[pro_price]" type="text" value="{$row.pro_price}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">{:__('Spec_name')}/{:__('Spec_price')}:</label>
                        <label for="c-spec_price" class="control-label col-xs-12 col-sm-2 hidden"></label>

                        <div class="col-xs-6 col-sm-6">
                            <textarea id="c-spec_name" class="editor input-sm" rows="10" cols="20" name="row[spec_name]" placeholder="特惠装">{$row.spec_name}</textarea>
                            <textarea id="c-spec_price" data-rule="required" class="editor input-sm" rows="10" cols="20" name="row[spec_price]" placeholder="10.00">{$row.spec_price}</textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-pro_brief" class="control-label col-xs-12 col-sm-2">{:__('Pro_brief')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-pro_brief" data-rule="required" class="form-control" name="row[pro_brief]" type="text" value="{$row.pro_brief}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-pro_content" class="control-label col-xs-12 col-sm-2">{:__('Pro_content')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <textarea id="c-pro_content" class="form-control editor" rows="5" name="row[pro_content]" cols="50">{$row.pro_content}</textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-pro_attr" class="control-label col-xs-12 col-sm-2">{:__('Pro_attr')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <dl class="fieldlist" rel="1" data-listidx="0" id="c-pro_attr" data-name="row[pro_attr]">
                                <dd>
                                    <ins>属性名称</ins>
                                    <ins>值</ins>
                                </dd>
                                <!--{foreach $row.pro_attr as $key => $vo}-->
                                {foreach name="row.pro_attr" item="vo" key="field" }
                                <dd class="form-inline">
                                    <input type="text" name="row[pro_attr][field][{$key}]" class="form-control" id="field-{$key}" value="{$field}" size="10" />
                                    <input type="text" name="row[pro_attr][value][{$key}]" class="form-control" id="value-{$key}" value="{$vo}" size="40" />
                                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                                </dd>
                                {/foreach}
                                <dd><a href="javascript:;" class="append btn btn-sm btn-success"><i class="fa fa-plus"></i> 追加</a></dd>
                            </dl>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-weigh" class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-is_top" class="control-label col-xs-12 col-sm-2">{:__('Is_top')}:</label>
                        <div class="col-xs-12 col-sm-8">

                            <select  id="c-is_top" data-rule="required" class="form-control selectpicker" name="row[is_top]">
                                {foreach name="isTopList" item="vo"}
                                    <option value="{$key}" {in name="row.is_top" value="$row.is_top"}selected{/in}>{$vo}</option>
                                {/foreach}
                            </select>

                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-freight_id" class="control-label col-xs-12 col-sm-2">{:__('Shop_freight')}:</label>
                        <div class="col-xs-12 col-sm-8">

                            <select  id="c-freight_id" data-rule="required" class="form-control selectpicker" name="row[freight_id]">
                                {foreach name="freightList" item="vo"}
                                <option value="{$key}" {eq name="row.freight_id" value="$key"}selected{/eq}>{$vo}</option>
                                {/foreach}
                            </select>

                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-status" class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
                        <div class="col-xs-12 col-sm-8" id="c-status">

                            <div class="radio">
                            {foreach name="statusList" item="vo"}
                            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="normal"}checked{/in} /> {$vo}</label>
                            {/foreach}
                            </div>

                        </div>
                    </div>
                </div>
                <div class="tab-pane fade" id="img">
                    <div class="form-group">
                        <label for="c-pro_image" class="control-label col-xs-12 col-sm-2">{:__('Pro_image')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <div class="input-group">
                                <input id="c-pro_image" data-rule="required" class="form-control" size="50" name="row[pro_image]" type="text" value="{$row.pro_image}">
                                <div class="input-group-addon no-border no-padding">
                                    <span><button type="button" id="plupload-pro_image" class="btn btn-danger plupload" data-input-id="c-pro_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-pro_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                    <span><button type="button" id="fachoose-pro_image" class="btn btn-primary fachoose" data-input-id="c-pro_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                </div>
                                <span class="msg-box n-right" for="c-pro_image"></span>
                            </div>
                            <ul class="row list-inline plupload-preview" id="p-pro_image"></ul>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-pro_slides" class="control-label col-xs-12 col-sm-2">{:__('Pro_slides')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <div class="input-group">
                                <input id="c-pro_slides" data-rule="required" class="form-control" size="50" name="row[pro_slides]" type="text" value="{$row.pro_slides}">
                                <div class="input-group-addon no-border no-padding">
                                    <span><button type="button" id="plupload-pro_slides" class="btn btn-danger plupload" data-input-id="c-pro_slides" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-pro_slides"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                    <span><button type="button" id="fachoose-pro_slides" class="btn btn-primary fachoose" data-input-id="c-pro_slides" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                </div>
                                <span class="msg-box n-right" for="c-pro_slides"></span>
                            </div>
                            <ul class="row list-inline plupload-preview" id="p-pro_slides"></ul>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-pro_images" class="control-label col-xs-12 col-sm-2">{:__('Pro_images')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <div class="input-group">
                                <input id="c-pro_images" data-rule="required" class="form-control" size="50" name="row[pro_images]" type="text" value="{$row.pro_images}">
                                <div class="input-group-addon no-border no-padding">
                                    <span><button type="button" id="plupload-pro_images" class="btn btn-danger plupload" data-input-id="c-pro_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-pro_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                    <span><button type="button" id="fachoose-pro_images" class="btn btn-primary fachoose" data-input-id="c-pro_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                </div>
                                <span class="msg-box n-right" for="c-pro_images"></span>
                            </div>
                            <ul class="row list-inline plupload-preview" id="p-pro_images"></ul>
                        </div>
                    </div>
                </div>
                <div class="form-group layer-footer">
                    <label class="control-label col-xs-12 col-sm-2"></label>
                    <div class="col-xs-12 col-sm-8">
                        <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
                        <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>